<?php
namespace App\Exceptions;

use Exception;
class BaseException extends Exception
{
    /**
     * BaseException 添加日志额外内容，可与全局 context 累加。
     */
    public function context() {
        return ['myException' => 'Cookcyq'];
    }

    /* 自定义响应内容 */
    public function render($request) {
        header("Content-type: text/html; charset=utf-8");
        return [
            'status'=>100,
            'msg' => $this->getMessage()
        ];
    }
}
